home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / bison.zip / MAKEFILE.MSC < prev    next >
Text File  |  1989-02-03  |  3KB  |  100 lines

  1. # Makefile for bison
  2. #   Copyright (C) 1984 Bob Corbett and Free Software Foundation, Inc.
  3.  
  4. #BISON is distributed in the hope that it will be useful, but WITHOUT ANY
  5. #WARRANTY.  No author or distributor accepts responsibility to anyone
  6. #for the consequences of using it or for whether it serves any
  7. #particular purpose or works at all, unless he says so in writing.
  8. #Refer to the BISON General Public License for full details.
  9.  
  10. #Everyone is granted permission to copy, modify and redistribute BISON,
  11. #but only under the conditions described in the BISON General Public
  12. #License.  A copy of this license is supposed to have been given to you
  13. #along with BISON so you can know your rights and responsibilities.  It
  14. #should be in a file named COPYING.  Among other things, the copyright
  15. #notice and this notice must be preserved on all copies.
  16.  
  17. # In other words, you are welcome to use, share and improve this program.
  18. # You are forbidden to forbid anyone else to use, share and improve
  19. # what you give them.   Help stamp out software-hoarding!  */
  20.  
  21. CC = cl
  22. LDFLAGS = /PAC /NOE /NOI /st:0x1800
  23. # For sysV, you must uncomment the following lines
  24. CFLAGS = -AL -Ox -DUSG -DMSC5
  25. #LIBS = -lPW
  26. #and comment out the assignment of CFLAGS below.
  27. #Also, if getopt.c gives any trouble, delete it from OBJECTS.
  28. #so the system's getopt will be used.
  29.  
  30.  
  31. DESTDIR=
  32. # where the installed binary goes
  33. BINDIR = $(DESTDIR)/usr/local
  34.  
  35. # where the parsers go
  36. PARSERDIR = .
  37.  
  38. # names of parser files
  39. PFILE = simple.bsn
  40. PFILE1 = hairy.bsn
  41.  
  42. # It is unwise ever to compile a program without symbols.
  43. #CFLAGS = -g -O
  44.  
  45. PFILES = -DXPFILE=\"$(PARSERDIR)/$(PFILE)\" -DXPFILE1=\"$(PARSERDIR)/$(PFILE1)\"
  46.  
  47. OBJECTS = LR0.obj allocate.obj closure.obj conflicts.obj derives.obj files.obj    \
  48.       getargs.obj gram.obj lalr.obj                    \
  49.       lex.obj main.obj nullable.obj output.obj print.obj reader.obj symtab.obj    \
  50.       warshall.obj                            \
  51.       getopt.obj
  52.  
  53. start: bison
  54.  
  55. clean:
  56.     rm -f *.obj core bison
  57.  
  58. install: bison
  59.     install bison $(BINDIR)
  60.     cp $(PFILE) $(PFILE1) $(PARSERDIR)
  61.  
  62. bison: $(OBJECTS)
  63.     link @names.lnk,bison $(LDFLAGS);
  64.  
  65. dist:    bison-dist.tar bison-dist.tar.Z
  66.  
  67. .PHONY: bison-dist.tar
  68. bison-dist.tar:
  69.     tar chvf bison-dist.tar \
  70.         COPYING Makefile REFERENCES bison.1 bison.simple bison.hairy \
  71.         LR0.c allocate.c closure.c conflicts.c \
  72.         derives.c files.c getargs.c gram.c lalr.c lex.c main.c \
  73.         nullable.c output.c print.c reader.c symtab.c warshall.c \
  74.         files.h gram.h lex.h machine.h new.h state.h symtab.h types.h \
  75.         bison.cld build.com vmsgetargs.c vmshlp.mar README \
  76.         bison.texinfo bison.info* \
  77.         -C ../lib getopt.c
  78. bison-dist.tar.Z: bison-dist.tar
  79.     compress < bison-dist.tar > bison-dist.tar.Z
  80.  
  81. # This file is different to pass the parser file names
  82. # to the compiler.
  83. files.obj: files.c files.h new.h gram.h
  84.     $(CC) -c $(CFLAGS) $(PFILES) files.c
  85.  
  86. LR0.obj: machine.h new.h gram.h state.h
  87. closure.obj: machine.h new.h gram.h
  88. conflicts.obj: machine.h new.h files.h gram.h state.h
  89. derives.obj: new.h types.h gram.h
  90. getargs.obj: files.h
  91. lalr.obj: machine.h types.h state.h new.h gram.h
  92. lex.obj: files.h symtab.h lex.h
  93. main.obj: machine.h
  94. nullable.obj: types.h gram.h new.h
  95. output.obj: machine.h new.h files.h gram.h state.h
  96. print.obj: machine.h new.h files.h gram.h state.h
  97. reader.obj: files.h new.h symtab.h lex.h gram.h
  98. symtab.obj: new.h symtab.h gram.h
  99. warshall.obj: machine.h
  100.